#pragma once

#include "../umlmodel_global.h"

#include <memory>
#include <vector>

#include "UMLDiagramElement.h"

using std::make_shared;
using std::shared_ptr;
using std::vector;

namespace uml {
class UMLDiagramElement;

/// <summary>
/// UMLCompartment
/// A separated portion of a UMLCompartmentableShape.
/// </summary>
class UMLMODEL_EXPORT UMLCompartment : public UMLDiagramElement {

public: // Constructors and destructors
    explicit UMLCompartment(const QString& umlType="uml::UMLCompartment");

public: // JsonSerializable override
    void fromJson(const QJsonObject& json, QStringList& errorList) override;
    void toJson(QJsonObject& json) override;

public: // Properties
    /// <summary>
    /// elementInCompartments getter
    /// Contents of the compartment.
    /// </summary>
    vector<shared_ptr<UMLDiagramElement>>& elementInCompartments();

private: // Fields
    /// <summary>
    /// elementInCompartments
    /// Contents of the compartment.
    /// </summary>
    vector<shared_ptr<UMLDiagramElement>> elementInCompartments_;

};

} // namespace uml
